import {
  publicChartsStyles,
  groupList,
  axisList,
  successionList,
  pubLegend,
  pubDatasetComponentType,
  pubLinkageSettingType,
  pubPenetrationSettingsType
} from '../constant';
import { cloneDeep } from 'lodash';
export const WidgetAreaChart = {
  type: 'widget-area-chart',
  label: '面积图',
  icon: 'widget-area-chart',
  options: {
    setups: [
      {
        type: 'el-input',
        label: '组件名称',
        name: 'componentName',
        required: false,
        placeholder: '',
        value: '面积图'
      },
      cloneDeep(pubDatasetComponentType),
      {
        type: 'el-select',
        label: '横坐标',
        name: 'xAxis',
        required: true,
        multiple: true, //是否可多选
        placeholder: '',
        value: []
      },
      {
        type: 'el-input',
        label: '图形值',
        name: 'yNum',
        readonly: true,
        placeholder: '',
        value: '1个'
      },
      {
        type: 'el-select',
        label: '主纵坐标',
        name: 'barChartValue',
        required: true,
        multiple: true, //是否可多选
        placeholder: '',
        value: []
      },
      // {
      //     type: 'linkageSettingType',
      //     label: '联动设置',
      //     name: 'linkageSetting',
      //     required: false,
      //     placeholder: '',
      //     value: {}
      // },
      // {
      //     type: 'penetrationSettingsType',
      //     label: '穿透设置',
      //     name: 'penetrationSettings',
      //     required: false,
      //     placeholder: '',
      //     value: {}
      // },
      cloneDeep(pubLinkageSettingType),
      cloneDeep(pubPenetrationSettingsType)
      // cloneDeep(pubLegend)
    ],
    styles: {
      // ...cloneDeep(publicChartsStyles)
      groupList: [...cloneDeep(groupList)],
      axisList: [...cloneDeep(axisList)],
      successionList: [...cloneDeep(successionList)],
      legendList: [...cloneDeep(pubLegend)]
    }
  }
};
